package com.aytbayev.asyl;

import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols;

import android.util.Log;

public class CurrencyItem {
	private int instrument_id;
	private String Full_Ticker;
	private String nin;
	private String instrument_name;
	private float free_amount;
	private String currency_name;	
	private float blocked_amount;
	private byte isBond;
	private String holdingPlace;
	private int FT_ID;
	
	public CurrencyItem() {		
	}
	
	public int getInstumentId() {
		return instrument_id;
	}
	
	public String getTicker() {
		return Full_Ticker;
	}
	
	public String getNin() {
		return nin;
	}
	
	public String getInstrumentName() {
		return instrument_name;
	}
	
	public String getCurrencyName() {
		return currency_name;
	}
		
	public float getFreeAmount() {
		return free_amount;
	}
	
	public float getBlockedAmount() {
		return blocked_amount;
	}
	
	public byte isBond() {
		return isBond;
	}
	
	public String getHoldingPlace() {
		return holdingPlace;
	}
	
	public String format(float a) {
		if ( a != 0){
			DecimalFormatSymbols formatSymbols =  new DecimalFormatSymbols();
		    formatSymbols.setGroupingSeparator(' ');
	
		    DecimalFormat myFormatter = new DecimalFormat("###,###.##", formatSymbols);
		    return myFormatter.format(a);
		} else {
			return "0";
		}
	}
}
